package demo2.UpdateEmployee;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

import db.DBUtil;

public class UpdateEmployeeDAO {
	
	  public static void Update(String emp_id, String sex,String name,String idcard,String birthday,String duty,String job,String depart,String tele,String time) throws SQLException{
	     Connection conn = DBUtil.getConnection();
		 Statement stmt=conn.createStatement();
	 	 String sql="update  emp_info set sex='"+sex+"',emp_name='"+name+"',idcard='"+idcard+"',birthday='"+birthday+"',duty='"+duty+"',job='"+job+"',department='"+depart+"',telephone='"+tele+"',entertime='"+time+"' where emp_id='"+emp_id+"'";
	 	 stmt.executeUpdate(sql);
         DBUtil.close(conn);
	     }
}
